﻿using EasyToHelp.Common;
using EasyToHelp.Entity;
using System;
using System.Collections.Generic;
using System.Text;

namespace EasyToHelp.Business
{
    public static class SysMenusBusiness
    {
        #region 获取初始化菜单
        /// <summary>
        /// 获取初始化菜单
        /// </summary>
        public static List<SysMenus> GetSysMenus()
        {
            return JsonHelper.DeserializeJsonToList<SysMenus>(HttpHelper.HttpGet(APIConfig.SysMenus));
        }
        #endregion

        #region 获得下级菜单
        /// <summary>
        /// 获得下级菜单
        /// </summary>
        /// <param name="PId"></param>
        /// <returns></returns>
        public static List<SysMenus> GetChildrenSysMenus(int PId)
        {
            return JsonHelper.DeserializeJsonToList<SysMenus>(HttpHelper.HttpGet(string.Format(APIConfig.ChildrenSysMenus, PId)));
        }
        #endregion
    }
}
